class DiskInfo(object):

    def __init__(self, *args, **kwargs):
        # 从不定参数或关键字参数中赋值
        self.total = kwargs.get('total', args[0] if len(args) > 0 else 0)
        self.available = kwargs.get('available', args[1] if len(args) > 1 else 0)
        self.used = kwargs.get('used', args[2] if len(args) > 2 else 0)
        self.usage = kwargs.get('usage', args[3] if len(args) > 3 else 0)
        self.model = kwargs.get('model', args[4] if len(args) > 4 else '')
        self.name = kwargs.get('name', args[5] if len(args) > 5 else '')
        self.partition_count = kwargs.get('partition_count', args[6] if len(args) > 6 else 0)
        self.temperature = kwargs.get('temperature', args[7] if len(args) > 7 else 0.0)
        self.serial = kwargs.get('serial', args[8] if len(args) > 8 else '')

    def __str__(self):
        return (f"DiskInfo(名称: {self.name}, 型号: {self.model}, 分区数量: {self.partition_count}, "
                f"总大小: {self.total / 1073741824 :.2f} GB, 已使用: {self.used / 1073741824 :.2f} GB, "
                f"可使用: {self.available / 1073741824 :.2f} GB, "
                f"已使用(%): {self.usage :.2f}%, 温度: {self.temperature}°C), 序列号: {self.serial}")
